This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes referencing another xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "referencing another xml" Watch "referencing another xml" New topic

referencing another xml

jonathan Greens
Ranch Hand

Joined: Apr 07, 2004
Posts: 139
hi folks,
I have two xmls:

how would I link all the elements of personx.xml to Department.xml, I understand that you can use xslt. But that involves running xml transform from another application and producing a new xml file(correct?).
is there a way to link it statically? Persons.xml doesn't have to have the root element.
Lasse Koskela

Joined: Jan 23, 2002
Posts: 11962
You can "import" the persons.xml document by specifying an ENTITY and referencing it with &MyPersonsDoc;

Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
jonathan Greens
Ranch Hand

Joined: Apr 07, 2004
Posts: 139
Thanks. But I want to use xml schema instead of dtd, and entity has to be declared within a dtd. IS there any other way?
I agree. Here's the link:
subject: referencing another xml
It's not a secret anymore!