�� ������ IntelliJ IDEA ���� DTD
support features�� ����մϴ�.

|
IDEA�� �θ� ���ǰ� �ִ� �� ���� DTD�� �̹� �����մϴ�. �׸��� �Ƹ�, ����� XML ������ ������ �ʿ䰡 �����ϴ�.
|
�Ϲ������� ���ϸé¼, XML�� DTD �ҽ��� URI(������. �װ��� �ݵ�� URL�� �̴�)�� ï¿½ï¿½ï¿½ï¿½Ï¸é¼ ï¿½ï¿½ï¿½Ï½ÃµË´Ï´ï¿½. ���� ��� ����� ����� xml ���Ͽ��� DTD �ҽ��� �̷��� ���Ͻ��� �� �ֽ��ϴ�:
<!DOCTYPE ejb-jar
PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans
2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd" >
IDEA�� DTD�� ��𿡼� ã�°��� �����ֱ� ���Ͽ� ����� ���ϴ� DTD��s�� ������ �����ϱ� ���Ͽ� File | Settings: IDE Settings:
External Resources ������ ����� �� �ֽ��ϴ�.
���� DTD URI ���ڿ��� URL�� �����ϸ�, IDEA�� ��ſ��� �� DTD�� �ٿ�ε��ϴ� ���� ����ϴ� Ư���� intention action�� ������ ���Դϴ�. ���� �ٿ�ε尡 �������̶��, IDEA�� �ý��� ������ ������ ������ ���̰�, File | Settings: IDE Settings:
External Resources �޴��� ������ �߰��� ���Դϴ�.
����ڿ��� URI�� �����ϴ� ���� ����ϰ� �ִ� �� �ٸ� intention action�� ���� �ֽ��ϴ�. �� ��쿡 URI�� �ٽô� ���� �����ϱ� ���� intention
action �� ���� ���ȵ��� �ʰų�, �����μ� �������� �ʽ��ϴ�. ��� ���õ� URI�� ���� File | Settings: IDE Settings:
External Resources �޴��� Configure ignored
resources ���� �־����ϴ�.
���� ǥ�õ� DTD URI�� Ʋ����, �װ��� ����(���������� ����)�μ� ��ũ�� ���̰� ������ �߻��� ������ ���� ������ ��ſ��� �˷��� �� �Դϴ�.
IDEA�� ���ǵ� DTD�� ���������� �߰��� ��, �װ��� ��� �ʿ��� validation �˻縦 �װ��� ����ϱ� ���� ������ ���Դϴ�.
�Դٰ�, �ڵ� �Ϸ�( ����Ű Ctrl + P
) ��� ���� ��� ���� ���ǰ� �̿�� �� ���� ���Դϴ�. �׸��� �׷��� ������, DTD(�Ǵ� ��Ű��) ���� ������ well-formedness �˻�� �����մϴ�.
IDEA�� ������ DTD validation�� �������� �������� �ʽ��ϴ�. �׷��Ƿ� �����ϴ� ���� ��ſ��� ������ �ɰ��� �������� �˷��� �� �Դϴ�.
������ validation�� �����ϱ� ���Ͽ� ����� Validate ���� ����ؾ߸� �մϴ�.

|
Validation ��ƾ�� ���� �ΰ��� ���λ����� ����, Editing
XML�� XML Validation �κ��� �����Ͻʽÿ�.
|
���� ���� ������ DTD ��쵵 IDEA���� �����˴ϴ�:
DOCTYPE ���� ����� ����
DOCTYPE ���� �ֹ� ����� �Բ� Ant ���� ������ �����ϴ� ��
Sample:
XML File with DTD Support
|
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
"http://java.sun.com/dtd/ejb-jar_2_0.dtd" >
<ejb-jar>
<description> Sample EJB provided by Atinav </description>
<display-name> XASampleJar </display-name>
<enterprise-beans>
<session>
<description></description>
<display-name> EnterpriseBean </display-name>
<ejb-name> EnterpriseBean </ejb-name>
<home> SamplePrograms.xa.AvenirHome </home>
<remote> SamplePrograms.xa.AvenirRemote </remote>
<ejb-class> SamplePrograms.xa.AvenirEJB </ejb-class>
<session-type> Stateful </session-type>
<transaction-type> Bean </transaction-type>
<resource-ref>
<res-ref-name> AvenirSample </res-ref-name>
<res-type> javax.sql.DataSource </res-type>
<res-auth> Container </res-auth>
</resource-ref>
</session>
</enterprise-beans>
<assembly-descriptor/>
</ejb-jar>
|